<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>新晨科技考试系统</title>
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		
		<link rel="stylesheet" href="/static/utils/bootstrap-3.3.0/css/bootstrap.min.css" />	
		<link rel="stylesheet" href="/static/utils/toastr/toastr.min.css" />
		
		<script type="text/javascript" src="/static/Script/jquery-3.0.0.min.js"></script>		
		
		<script type="text/javascript" src="/static/utils/bootstrap-3.3.0/js/bootstrap.min.js" ></script>
		<script type="text/javascript" src="/static/utils/toastr/toastr.min.js" ></script>
		<script type="text/javascript" src="/static/utils/bootstrap-validator/validator.min.js" ></script>
		
		<style type="text/css">
			body{
				overflow-x: hidden;	
			}
			.top,.middle,.bottom{
				position: relative;
			}
			.top{
				height: 10em;
				background-color: rgb(58,110,165);
				margin-bottom: 20px;
			}
			.middle{
				text-align: center;
				padding: 2em 0;
			}
			.middle img{
				width: 10em;
				height: 10em;
				border-radius: 50%;
			}
			.bottom{
				/*position: absolute;
				bottom: 8em;*/
				width: 100%;
			}
		</style>
		
		<script>
			
			function regisResult(errorCode,data){
				if(errorCode != 0){
					if(errorCode == 9000){
						toastr.warning("用户名已存在!");
					}else{
						toastr.error("注册失败，请重试!")	;		
					}
					return;
				}
				window.location.href = "login.html";
			}
			
			$(function(){
				
				$('#loginForm').on('submit',function(e){
					/*
					e.preventDefault();
					var username = $('#uid').val();
					var password = $('#upwd').val();				
					
					var dspnam = $("#dspnam").val();
					var age = $("#age").val();
					var sex = $("#sex").val();
					var cellphone = $('#cell').val();
					var email = $('#email').val();
					var qqn = $("#qqn").val();
					var dep = $("#dep").val();
					var school = $("#school").val();
					var cls = $("#cls").val();
					var edu = $("#edu").val();
					var gratim = $("#gratim").val();
				 	var expsal = $("#expsal").val();
				 	var expadr = $("#expadr").val().join(",");
					
					if($.isEmptyObject(username) || $.isEmptyObject(password)){						
						alert('请输入用户名密码!');
						return;
					}
					
					var action = "regis";					
					var cmdArgObjs = {username:username,password:password,
										dspnam:dspnam,age:age,sex:sex,
										cellphone:cellphone,email:email,qqn:qqn,
										school:school,dep:dep,cls:cls,edu:edu,gratim:gratim,
										expsal:expsal,expadr:expadr};
					//DBManager.getData(action,cmdArgObjs,loginResult);
					$.post("/regis", cmdArgObjs, regisResult, "json");
					*/
				})				

			})
			
		</script>
		
	</head>
	<body>
		<div class="top">
			<div style="padding-top: 20px;padding-left: 30px;color: white;">
				<h2>Brilliance|新晨科技</h2>
				<p><strong>考试系统</strong></p>
			</div>			
		</div>		
		<div class="container-fluid">		
	        <form class="" data-toggle="validator" role="form" 
				id="loginForm" style="margin-bottom: 20px;"
				action="/regis" method="post">
	            <div class="form-group">
	            	<label>用户名</label>
	                <input type="text" class="form-control"  id="uid" name="username" placeholder="请输入用户名" required>
	                <div class="help-block with-errors"></div>
	            </div>
	            <div class="form-group">
	            	<label>密码</label>
	                <input type="password" class="form-control" id="upwd" name="password" placeholder="请输入密码" required>
	                <div class="help-block with-errors"></div>
	            </div>
				<div class="form-group">
				   	<label>确认密码</label>
	                <input type="password" class="form-control" id="upwd1" name="password1" 
	                	data-match="#upwd" data-match-error="输入不一致"                 	
	                	placeholder="请确认密码" required>
	                <div class="help-block with-errors"></div>
	            </div>
	            <hr />
	            <div class="form-group">
	            	<label>姓名</label>
	                <input type="text" class="form-control" id="dspnam" name="dspnam" placeholder="请输入姓名" required>
	                <div class="help-block with-errors"></div>
	            </div>
	            <div class="form-group">
	            	<label>年龄</label>
	                <input type="number" class="form-control" id="age" name="age" placeholder="请输入年龄">
	                <div class="help-block with-errors"></div>
	            </div>
	            <div class="form-group">
					<label>性别</label>	
	                <select id="sex" name="sex" class="form-control">
	                	<option value="M">男</option>
	                	<option value="F">女</option>	                		               
	                </select>	                
	            </div>
				<div class="form-group">
					<label>手机号码</label>
	                <input type="text" class="form-control"  id="cell" name="phonenumber" 
	                	pattern="^[0-9]{11}$" maxlength="11" placeholder="请输入11位手机号"
	                 	data-error="请输入11位手机号" >
	                <span class="glyphicon form-control-feedback" aria-hidden="true"></span>
	                <div class="help-block with-errors"></div>
	            </div>
	            <div class="form-group">
					<label>QQ</label>
	                <input type="number" class="form-control"  id="qqn" name="qqn" placeholder="[选填]请输入QQ号">
	                <div class="help-block with-errors"></div>
	            </div>
				<div class="form-group">
					<label>Email</label>
	                <input type="email" class="form-control"  id="email" name="email" 
	                	data-error="请输入正确的email地址" placeholder="请输入邮箱" >
	                <span class="glyphicon form-control-feedback" aria-hidden="true"></span>
	                <div class="help-block with-errors"></div>
	            </div>
	            <div class="form-group">
					<label>学校</label>
	                <input type="text" class="form-control"  id="school" name="school" placeholder="请输入学校" >
	                <div class="help-block with-errors"></div>
	            </div>
	            <div class="form-group">
					<label>院系</label>
	                <input type="text" class="form-control"  id="dep" name="dep" placeholder="请输入院系" >
	                <div class="help-block with-errors"></div>
	            </div>
	            <div class="form-group">
					<label>班级</label>
	                <input type="text" class="form-control"  id="cls" name="cls" placeholder="请输入班级" >
	                <div class="help-block with-errors"></div>
	            </div>
	            
	            <div class="form-group">
					<label>学历</label>	                
	                <select id="edu" name="edu" class="form-control">
	                	<option value="大专">大专</option>
	                	<option value="本科">本科</option>
	                	<option value="硕士">硕士</option>
	                	<option value="博士">博士</option>
	                </select>
	            </div>
	            <div class="form-group">
					<label>毕业时间</label>	                
	                <select id="gratim" name="gratim" class="form-control">	                	
	                	<option value="2017">2017</option>
	                	<option value="2016">2016</option>
	                	<option value="2015">2015</option>
	                	<option value="2014">2014</option>
	                	<option value="2013">2013</option>
	                	<option value="2012">2012</option>
	                </select>
	            </div>	            
				<div class="form-group">
					<label>期望薪资</label>
	                <input type="text" class="form-control"  id="expsal" name="expsal" 
	                	pattern="^[0-9]{1,10}$" maxlength="10" placeholder="请输入期望薪资" >
	                <div class="help-block with-errors"></div>
	            </div>
	            <div class="form-group">
					<label>意向工作地点</label>	                
	                <select id="expadr" multiple="multiple" name="expadr" class="form-control">	                	
	                	<option value="武汉">武汉</option>
	                	<option value="北京">北京</option>
	                	<option value="上海">上海</option>
	                	<option value="广州">广州</option>
	                </select>
	            </div>	            
	            <button type="submit" id="login_btn" class="btn btn-default" style="width: 100%;border-radius: 2em;background-color:  rgb(58,110,165);color: white;font-weight: bolder;height:2.7em;font-size: 1.3em;">注&nbsp;册</button>
	        </form>
		</div>
	</body>	
	
</html>
